package demo;
import java.math.BigInteger;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-09-14  21:27
 */
public class Test9 {
    public static void main(String[] args) {
        int n = 1;
        BigInteger factorial = BigInteger.ONE;
        BigInteger sum = BigInteger.ZERO;
        do {
            factorial = factorial.multiply(BigInteger.valueOf(n));
            sum = sum.add(factorial);
            n++;
        } while (n <= 100);
        System.out.println(sum);}
}
